﻿using __ts.Core.Api;

/*
 *  author: able
 *  @2012/2/21 10:31:10
 * 
 */
namespace __ts.Core.Filter.Codec
{
    /// <summary>
    /// 
    /// </summary>
    public interface ProtocolCodecFactory
    {

        /**
         * Returns a new (or reusable) instance of {@link ProtocolEncoder} which
         * encodes message objects into binary or protocol-specific data.
         */
        ProtocolEncoder getEncoder(IoSession session);

        /**
         * Returns a new (or reusable) instance of {@link ProtocolDecoder} which
         * decodes binary or protocol-specific data into message objects.
         */
        ProtocolDecoder getDecoder(IoSession session);
    }
}